package cn.lili.controller.payment;

import cn.lili.common.utils.ResultUtil;
import cn.lili.common.vo.PageVO;
import cn.lili.common.vo.ResultMessage;
import cn.lili.common.vo.SearchVO;
import cn.lili.modules.order.order.entity.dto.OrderSearchParams;
import cn.lili.modules.payment.entity.dos.RefundLog;
import cn.lili.modules.payment.service.RefundLogService;
import cn.lili.mybatis.util.PageUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 退款日志接口
 *
 * @author Chopper
 * @since 2020/11/16 10:07 下午
 */
@RestController
@Api(tags = "退款日志接口")
@RequestMapping("/payment/refund-log")
@RequiredArgsConstructor
public class RefundLogController {

    private final RefundLogService refundLogService;

    @GetMapping
    @ApiOperation(value = "分页获取退款日志")
    public ResultMessage<Page<RefundLog>> getByPage(OrderSearchParams searchParams) {
        return ResultUtil.data(refundLogService.queryRefundLogs(searchParams));
    }

}
